<div class="dashboard">
    <div class="row">
        <div class="col-md-6 form-group" uib-dropdown is-open="vm.isOpen" keyboard-nav>
            <label>Metrics:</label>
            <input placeholder="metrics name" ng-click="vm.toggled(true)" uib-dropdown-toggle
            class="input-sm form-control" type="search" ng-model="query" ng-keydown="vm.onKeyDown($event)"
            />
            <div class="dropdown-menu" uib-dropdown-menu aria-labelledby="simple-dropdown">
                <table search-watch-model="query" st-table="vm.list" st-safe-src="vm.metrics" class="table">
                    <tbody>
                        <tr ng-class="{'select-row':index==vm.selectedIndex}" ng-repeat="(index,m) in vm.list"
                        ng-click="vm.selectName(m)">
                            <td>{{vm.metricName(m)}}</td>
                        </tr>
                    </tbody>
                    <tfoot ng-click="$event.stopPropagation()">
                        <tr>
                            <td class="text-center">
                                <div st-items-by-page="10" st-pagination=""></div>
                            </td>
                        </tr>
                    </tfoot>
                </table>
            </div>
        </div>
        <div class="selected col-md-6 form-group">
            <ul>
                <li ng-repeat="m in vm.selectedNames" ng-click="vm.removeName(m)">
                    <span>{{vm.metricName(m)}}</span>
                    <button class="btn sm-btn red"><i class="fa fa-close"></i>
                    </button>
                </li>
            </ul>
        </div>
    </div>

    <div class="row" ng-show="false">
        <div class="col-md-6 form-group">
            <label>Tags:</label>
        </div>
    </div>
    <div class="row">
        <div class="col-md-6">
            <button class="monitor-btn btn btn-danger active" ng-click="vm.monitor()">Monitor</button>
	    <label><input type="checkbox" ng-model="vm.enablePercentile"/> Enable percentile</label>
                        <button class="btn btn-info" ng-click="vm.openSettings()">
				Add any class to Metrics 
                        </button>
        </div>
    </div>
    <div class="row">
        <nvd3 options="vm.chartOptions" data="vm.chartData"></nvd3>
    </div>
    <div class="row">
        <nvd3 options="vm.chartCostOptions" data="vm.chartCostData"></nvd3>
    </div>
</div>
